<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{{title}}</title>
</head>
<body>
<div>
    <h3>
        {{info}}, <span id="time">5</span> 秒之后自动跳转，<a href="/">点击跳转</a>
    </h3>
    <h3>
        <span id="test"></span>
    </h3>
</div>
<script type="text/javascript">
var time = 4;
onload=function() { //在进入网页的时候加载该方法
    setInterval(go, 1000);
};
function go(){
    if (time < 0) {
        location.href="/";
    } else {
        document.getElementById('time').innerHTML = time;
        time --;
    }
}
</script>
</body>
</html>